<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Title</title>
    <link rel="stylesheet" href="${pageContext.request.contextPath}/layui/css/layui.css">
    <script src="${pageContext.request.contextPath}/jquery-1.8.3.min.js"></script>
    <script src="${pageContext.request.contextPath}/layui/layui.js"></script>
</head>
<body>
<a href="toAdd">添加水果</a>
<table class="layui-table">
    <tr>
        <td>类别</td>
        <td>品种</td>
        <td>产地</td>
        <td>总重量(公斤)</td>
        <td>单价(元/公斤)</td>
        <td>操作4</td>
    </tr>

    <c:forEach items="${list}" var="fruit">
        <tr>
            <td>${fruit.type}</td>
            <td>${fruit.breed}</td>
            <td>${fruit.area}</td>
            <td>${fruit.weight}</td>
            <td>${fruit.price}</td>
            <td>
                <a href="${pageContext.request.contextPath}/user/${fruit.fruitId}">查看</a>
                <a href="${pageContext.request.contextPath}/update/${fruit.fruitId}">修改</a>
                <a href="${pageContext.request.contextPath}/delete/${fruit.fruitId}">删除</a>
            </td>
        </tr>
    </c:forEach>
</table>
</body>
</html>
